package cn.bby.query.server.infrastructure.db.mapper;

import cn.bby.query.server.infrastructure.db.entity.DsSettingsTable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author ben
 * @since 2025/4/26 15:54
 */
@Mapper
public interface DsSettingsTableMapper extends BaseMapper<DsSettingsTable> {

    @Select("SELECT * FROM ds_settings_table t LEFT JOIN ds_settings_db d ON t.db_id = d.db_id WHERE d.db_name = #{db} AND t.table_name = #{name} limit 1")
    DsSettingsTable getTableInfoByFullName(@Param("db") String db, @Param("name") String name);
}
